#ifdef ENABLE_DB_JUDGE

#include "databaseJudge.hpp"

ProcessStatus DatabaseConnectComponent::init(std::string host, int port,
                    std::string user, std::string passwd) {
    auto res = create_mysql_connect(&this->conn, host, port, user, passwd, "");
    connected = res.result == RUN_OK;
    return res;
}
DatabaseConnectComponent::~DatabaseConnectComponent() {
    if (connected) {
        mysql_close(&conn);
    }
}
#endif

